package old.apiday02;

public class MatchesDemo {
    public static void main(String[] args) {
        //邮箱正则表达式：[a-zA-Z0-9_]+[a-zA-Z0-9]+(\.[a-zA-Z]+)+
        String email="wangkej@tedu.com";
        String regex="[a-zA-Z0-9_]+@[a-zA-Z0-9]+(\\.[a-zA-Z]+)+";
        boolean match=email.matches(regex);
        if (match){
            System.out.println("right");
        }else {
            System.out.println("wrong");
        }
    }
}
